//
//(C) Copyright 2011 HongKong Airline.,Ltd. 
//
/**
 * messageUserAction
 * 项目名称:代购系统
 * @author Mengxiangliang
 * 功能描述:
 * 历史版本:2013-01-04 v1.0.0 Mengxiangliang  创建:
 * @version [V1] 
 */
package com.gamutsoft.amb.messageuser.action;

import java.util.List;
import java.util.Map;

import com.gamutsoft.amb.base.action.BaseAction;
import com.gamutsoft.amb.common.bean.QueryExample;
import com.gamutsoft.amb.common.exception.BusinessException;
import com.gamutsoft.amb.common.util.ConditionUtil;
import com.gamutsoft.amb.common.util.PageUtil;
import com.gamutsoft.amb.messageuser.model.MessageUser;
import com.gamutsoft.amb.messageuser.service.IMessageUserService;


@SuppressWarnings({"serial","rawtypes"})
public class MessageUserAction extends BaseAction {
	
	private MessageUser messageUser;
	
	private List<Map> messageUserList;
	
	private IMessageUserService messageUserService;

	/**
	 * 初始化查询MessageUser信息
	 * @author Mengxiangliang
	 * @return
	 */
	public String initSearchMessageUser()throws BusinessException, Exception {
		try {
		    QueryExample qe =ConditionUtil.copyConditionBySql(this.getRequest());
			PageUtil  pageutil =new PageUtil(this.getRequest());
			pageutil.setPageSize(PageUtil.PAGESIZE);
			qe.setPageUtil(pageutil);
			messageUserList = messageUserService.searchMessageUserList(qe);
		} catch(BusinessException be){
			log.error(be);
			throw be;
		}catch(Exception e){
			log.error(e);
			throw e;
		}
		return "init_search_messageUser_success";
	}
	
	
	/**
	 * @return the messageUser
	 */
	public MessageUser getMessageUser() {
		return messageUser;
	}

	/**
	 * @param messageUser the messageUser to set
	 */
	public void setMessageUser(MessageUser messageUser) {
		this.messageUser = messageUser;
	}

	/**
	 * @return the messageUserList
	 */
	public List<Map> getMessageUserList() {
		return messageUserList;
	}

	/**
	 * @param messageUserList the messageUserList to set
	 */
	public void setMessageUserList(List<Map> messageUserList) {
		this.messageUserList = messageUserList;
	}

	/**
	 * @param messageUserService the messageUserService to set
	 */
	public void setMessageUserService(IMessageUserService messageUserService) {
		this.messageUserService = messageUserService;
	}
}
